(function() {
  var $, HomeController, TomatoBreak, changePage, createController;
  var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) {
    for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; }
    function ctor() { this.constructor = child; }
    ctor.prototype = parent.prototype;
    child.prototype = new ctor;
    child.__super__ = parent.prototype;
    return child;
  }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
  TomatoBreak = this.TomatoBreak;
  $ = jQuery;
  createController = TomatoBreak.ControllerFactory.create;
  changePage = TomatoBreak.changePage;
  HomeController = (function() {
    __extends(HomeController, Spine.Controller);
    HomeController.elements = {
      '#home': 'home',
      '#sign-up': 'signUp',
      '#sign-in': 'signIn'
    };
    function HomeController() {
      HomeController.__super__.constructor.apply(this, arguments);
      createController(this.signUp, TomatoBreak.MembershipController, {
        modelName: 'User'
      });
      createController(this.signIn, TomatoBreak.MembershipController, {
        modelName: 'Session'
      });
      this.routes({
        '!/sign-up': __bind(function() {
          return changePage(this.signUp);
        }, this),
        '!/sign-in': __bind(function() {
          return changePage(this.signIn);
        }, this),
        '': __bind(function() {
          return changePage(this.home);
        }, this)
      });
      Spine.Route.setup();
    }
    return HomeController;
  })();
  $(function() {
    return new HomeController({
      el: $('#main')
    });
  });
}).call(this);
